package com.getpebble.android.onboarding.fragment;

import android.app.Activity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;
import com.getpebble.android.R;
import com.getpebble.android.common.core.trace.Analytics.MobileAppBehavior;
import com.getpebble.android.common.framework.fragment.PblBaseFragment;
import com.getpebble.android.onboarding.activity.OnboardingActivity;

public class SetupCompleteFragment extends PblBaseFragment {
    public int getLayoutId() {
        return R.layout.fragment_setup_complete;
    }

    public void init(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        MobileAppBehavior.logScreenOpened("OnboardingDone");
        ((Button) container.findViewById(R.id.onboarding_done_btn)).setOnClickListener(new OnClickListener() {
            public void onClick(View view) {
                MobileAppBehavior.logButtonTapped("done", "OnboardingDone");
                Activity activity = SetupCompleteFragment.this.getActivity();
                if (activity != null && (activity instanceof OnboardingActivity)) {
                    ((OnboardingActivity) activity).goToNextScreen();
                }
            }
        });
    }
}
